<template>
    <div>
         <list title="新增联系人"/>
         <div class="lr">
             <van-address-edit
                :area-list="areaList"
                show-postal
                show-set-default
                :area-columns-placeholder="['请选择', '请选择', '请选择']"
                @save="onSave"
             />
         </div>
    </div>
</template>
<script>
import list from '@views/Home/component/ItemListHead'
import { areaList } from '@vant/area-data'
import { Toast } from 'vant'
export default {
  data () {
    return {
      areaList
    }
  },
  methods: {
    onSave (conent) {
      this.$store.commit('contact/add_contact', conent)
      Toast('添加成功')
      this.$router.replace('./contactLists')
    }
  },
  components: {
    list
  }
}
</script>

<style lang='scss'>
.lr{
    margin-top: 46px;
}
</style>
